package com.example.task.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author 陈建峰
 * @date 2022/10/31 14:13
 * @Description 工作事件
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("zdy_task_info")
public class TaskEntity {

    @TableId(type = IdType.AUTO)
    private Long id;

    //事件主体
    private Long eventId;

    @TableField("task_name")
    private String name;

    //事件执行人
    @TableField("people")
    private String people;

    /**
     * 执行状态
     */
    @TableField("status")
    private Integer status;

    @TableField("start_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @TableField("end_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    //备注
    @TableField(exist = false)
    private String remark;

    //事件执行顺序
    private Integer sort;


}
/*
执行事件详情步骤

 */
